package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.ruicar.afs.cloud.apply.common.entity.ApplyCarInvoice;
import com.ruicar.afs.cloud.apply.common.entity.ApplyContractInfo;
import com.ruicar.afs.cloud.apply.common.entity.ApplyCustBaseInfo;
import com.ruicar.afs.cloud.apply.common.entity.ApplyOrderInfo;
import com.ruicar.afs.cloud.apply.contract.condition.LoanAppFormStateCondition;
import com.ruicar.afs.cloud.apply.contract.condition.LoanAppSignPeopleListCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyAppFaceCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyAppFormStateCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyAppSignAgreeMentCondition;
import com.ruicar.afs.cloud.bizcommon.cfca.dto.CfCaSignatureDto;
import com.ruicar.afs.cloud.common.core.security.service.AfsUser;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.image.entity.ComAttachmentFile;
import com.ruicar.afs.cloud.image.entity.ComAttachmentManagement;

import java.util.List;

/**
 * @description: 进件App service
 * @author: mingzhi.li
 * @date: 2020/8/17 21:11
 */
public interface ApplyAppService {

    /**
     * 根据客户id获取角色信息
     *
     * @param custId
     * @return
     */
    public ComAttachmentManagement getComAttachmentManagement(Long custId);

    /**
     * 获取合作商登陆附件标识
     *
     * @return
     */
    public ComAttachmentManagement getUserNameManagement();

    /**
     * 签章文件合成开始
     * @param dto
     *
     * @return
     */
    public IResponse electronicSignature(CfCaSignatureDto dto);

    /**
     * 签章文件合成开始(贷后银行卡变更)
     * @param dto
     *
     * @return
     */
    public IResponse electronicBankInfo(CfCaSignatureDto dto);

    /**
     * 进件获取签约文件List
     * @param condition
     *
     * @return
     */
    public List<ComAttachmentFile> getApplyFileList(ApplyAppSignAgreeMentCondition condition);
    /**
     * 进件获取签约文件List
     * @param condition
     *
     * @return
     */
    public List<ComAttachmentFile> getApplyFileListAll(ApplyAppFormStateCondition condition);

    /**
     * 进件所有角色是否全部生成合同
     * @param condition
     *
     * @return
     */
    public String getApplyFileIsComplete(ApplyAppFormStateCondition condition);
    /**
     * 放款获取签约文件List
     * @param condition
     *
     * @return
     */
    public List<ComAttachmentFile> getLoanFileList(LoanAppSignPeopleListCondition condition);
    /**
     * 放款获取签约所有签约文件
     * @param condition
     *
     * @return
     */
    public List<ComAttachmentFile> getLoanFileListAll(LoanAppFormStateCondition condition);

    /**
     * 放款所有角色是否全部生成合同
     * @param condition
     *
     * @return
     */
    public String getLoanFileIsComplete(LoanAppFormStateCondition condition);

    /**
     * 预审批获取签约文件List
     * @param condition
     *
     * @return
     */
    public List<ComAttachmentFile> getPreFileList(ApplyAppSignAgreeMentCondition condition);

    /**
     * 进件 flag接口（业务类型区域组装）
     * @param stateCondition
     * @return
     */
    public ApplyAppFormStateCondition getBusinessTypeArea(ApplyAppFormStateCondition stateCondition);

    /**
     * 进件 flag接口（挂靠信息区域组装）
     * @param stateCondition
     * @param applyOrderInfo
     * @return
     */
    public ApplyAppFormStateCondition getAffiliatedInfoArea(ApplyAppFormStateCondition stateCondition, ApplyOrderInfo applyOrderInfo);

    /**
     * 进件 flag接口（资产信息区域组装）
     * @param stateCondition
     * @param applyOrderInfo
     * @return
     */
    public ApplyAppFormStateCondition getAssetsInfoArea(ApplyAppFormStateCondition stateCondition, ApplyOrderInfo applyOrderInfo);

    /**
     * 进件 flag接口（客户信息区域组装）
     * @param stateCondition
     * @param applyOrderInfo
     * @return
     */
    public ApplyAppFormStateCondition getCustInfoArea(ApplyAppFormStateCondition stateCondition, ApplyOrderInfo applyOrderInfo);
    /**
     * 进件 flag接口（协议签约状态）
     * @param stateCondition
     * @return
     */
    public ApplyAppFormStateCondition getSignInfoArea(ApplyAppFormStateCondition stateCondition);

    /**
     * 进件 flag接口（附件信息）
     * @param stateCondition
     * @param applyOrderInfo
     * @return
     */
    public ApplyAppFormStateCondition getAttachmentsArea(ApplyAppFormStateCondition stateCondition,ApplyOrderInfo applyOrderInfo);

    /**
     * 放款 flag接口（业务类型区域组装）
     * @param condition
     * @param applyOrderInfo
     * @return
     */
    public LoanAppFormStateCondition getInvoiceTypeArea(LoanAppFormStateCondition condition,ApplyOrderInfo applyOrderInfo);
    /**
     * 放款 flag接口（Gps区域组装）
     * @param condition
     * @param applyOrderInfo
     * @param contractInfo
     * @return
     */
    public LoanAppFormStateCondition getGpsInfoArea(LoanAppFormStateCondition condition, ApplyOrderInfo applyOrderInfo, ApplyContractInfo contractInfo);
    /**
     * 放款 flag接口（附加带信息）
     * @param condition
     * @return
     */
    public LoanAppFormStateCondition getFinancingItemsArea(LoanAppFormStateCondition condition);

    /**
     * 放款 flag接口（客户信息）
     * @param condition
     * @return
     */
    public LoanAppFormStateCondition getCustInfoArea(LoanAppFormStateCondition condition);
    /**
     * 放款 flag接口（其他信息）
     * @param condition
     * @return
     */
    public LoanAppFormStateCondition getOtherInfoArea(LoanAppFormStateCondition condition);
    /**
     * 放款 获取见证人签约信息
     * @param user
     * @param condition
     * @return
     */
    public LoanAppSignPeopleListCondition getWitnessesInfo(AfsUser user,LoanAppSignPeopleListCondition condition);
    /**
     * 放款 获取车商签约信息
     * @param condition
     * @return
     */
    public LoanAppSignPeopleListCondition geCarDealerInfo(LoanAppSignPeopleListCondition condition, ApplyCarInvoice applyCarInvoice);

    /**
     * 放款 flag接口（附件信息）
     * @param condition
     * @param applyOrderInfo
     * @return
     */
    public LoanAppFormStateCondition getLoanAttachmentsArea(LoanAppFormStateCondition condition,ApplyOrderInfo applyOrderInfo);

    /**
     * 人脸识别接口
     * @param condition
     * @return
     */
    public IResponse signToFace(ApplyAppFaceCondition condition);

    /**
     * 人脸识别面签照片
     * @param info
     * @return
     */
    public IResponse faceToFaceSign(ApplyCustBaseInfo info,String queryImagePackage,ApplyAppFaceCondition condition);
}
